/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package coalescent.cef.event;

import cef.event.Event;
import coalescent.data.meta.MetaInf_Mngr;
import coalescent.model.PopGenModel;
import coalescent.recursion.RecursionListener;
import coalescent.statistic.AC;

import java.util.List;

/**
 * Fetches input necessary for the corresponding command {@link coalescent.cef.command.RunRecursionCommand}.
 *
 * @author Susanta Tewari
 * @version 1.0 Dec 31, 2010
 * @param <L>
 */
public interface RunRecursionEvent<L extends RecursionListener> extends Event {

    /**
     * @return the model in the recursion
     */
    PopGenModel getModel();

    /**
     * @return the statistic in the recursion
     */
    AC getStatistic();

    /**
     * @return information on meta-inf
     */
    MetaInf_Mngr getMetaInf();

    /**
     * The listeners are mutable objects supposed to be modified by {@link coalescent.recursion.Recursion}. The
     * relevant command should cache the values, else, {@link IllegalStateException} may be thrown.
     *
     * @return the listeners attached to the exact recursion
     */
    List<L> getListeners();

    /**
     * @version version
     * @since 1.4.0
     * @history Created on 03/24/2013
     * @author Susanta Tewari
     */
    public static interface DEFAULT extends RunRecursionEvent<RecursionListener> {}
}
